The present invention relates generally to image reproduction and, more specifically, to a method for applying tonal correction to a binary halftone image.
In order to reproduce a realistic image of a scene, the reproduced image must have a believable tonal representation of the original scene. Tonal representation refers to the relative values of tone within an image (hereinafter referred to as xe2x80x9crelative tonal valuesxe2x80x9d), which help provide important information about the image, such as surface characteristics. Typically, these relative tonal values are measured at fixed spatial coordinates on a rectangular grid where each sample point is referred to as a picture element, commonly known as a pixel.
Image-reproduction systems fall into two categories: (1) systems capable of rendering continuous tone (contone systems); and (2) systems with limited tone reproduction capacity (binary systems). In contone systems, pixels can take on a wide range of tonal values. Examples of contone systems include photography and television. In contrast, pixels in binary systems can only take on one of two tonal values. These values correspond to either an xe2x80x9conxe2x80x9d or an xe2x80x9coffxe2x80x9d state. For example, in printing devices, such as offset or flexo presses, each pixel on a printed medium can either be covered (xe2x80x9conxe2x80x9d) or not covered (xe2x80x9coffxe2x80x9d) by ink. For color printing, each pixel can either be xe2x80x9conxe2x80x9d or xe2x80x9coffxe2x80x9d for each layer of a different color ink. Such layers are commonly referred to as color separations.
Since images to be reproduced by such binary systems are often initially contone images, these binary systems use a process called xe2x80x9chalftoningxe2x80x9d to achieve a wider range of tonal values (gray or color levels). Thus, the binary systems achieve a believable tonal representation of the original contone images. In general, halftoning is a process for approximating continuous-tone values using a pattern of pixels. Various halftone processes are well known in the art, such as error diffusion and dithering.
Basically, the halftoning process defines a region of pixels as a halftone cell, sometimes referred to simply as a xe2x80x9ccellxe2x80x9d. The halftone cell contains a specific, repeatable pattern referred to as a xe2x80x9chalftone patternxe2x80x9d that is typically beyond the resolution of the eye. For each xe2x80x9chalftone pattern,xe2x80x9d the pixels are numbered in a specific order. The specific order determines the sequence for turning pixels xe2x80x9conxe2x80x9d in the halftone cell. The number of pixels in the cell determines its tonal range. For example, a halftone cell with a two-by-two matrix of pixels may represent five different intensities of a color (also commonly referred to as shades or tonal values): white; black; and three intermediate levels of gray. The color white is represented by all four pixels in a white or xe2x80x9coffxe2x80x9d state. Conversely, black is represented by all four pixels in a black or xe2x80x9conxe2x80x9d state. The intermediate levels of gray are represented by one, two or three pixels in the xe2x80x9conxe2x80x9d state and the remaining pixels in the xe2x80x9coffxe2x80x9d state.
A tonal value for a specific location xe2x80x9cseenxe2x80x9d by the eye (hereinafter referred to as a xe2x80x9cvisible tonexe2x80x9d) is approximated using the halftone pattern in the neighborhood of the location, i.e. approximately the percentage of xe2x80x9conxe2x80x9d pixels in the neighborhood of the specific location. The visible tonal value is only approximately, and not exactly proportional to the percentage of xe2x80x9conxe2x80x9d pixels, due to a variety of reasons related to the printing environment. Some of such reasons are that printing devices do not produce ink spots with exactly the same size and shape as a pixel; light reflection and diffusion in the selected paper affect the tone; hue and density of the ink may differ between printing devices. Therefore, in order to achieve the desired tonal representation for a specific printing device, a calibration curve is applied before printing. The calibration curve is specific to each individual printing system and is derived experimentally using methods well known in the art. The calibration curve describes the required percentage of xe2x80x9conxe2x80x9d halftone pixels for generating each tonal value for a specific printing environment. Some calibration curves describe this relationship for each color separation. However, other calibration curves describe the required number of xe2x80x9conxe2x80x9d halftone pixels for each color separation based on the overall desired tonal value taking into consideration the interaction between the color separations. The process of applying a specific calibration curve to a halftone image is referred to as xe2x80x9ctonal calibrationxe2x80x9d or xe2x80x9ctonal correctionxe2x80x9d. A halftone image that has a percentage of xe2x80x9conxe2x80x9d pixels proportional to the original image is referred to as an xe2x80x9cuncalibratedxe2x80x9d image because the desired tonal value of the original image is achieved without modifying the tonal values of the pixels.
Preferably, when a contone image is received, a binary image reproduction system performs tonal correction utilizing a calibration curve associated with the target printer before performing or completing the halftone process. However, in certain situations, the target printing device may acquire a digital halftone image or a halftone film that is subsequently converted to a digital halftone image by a copydot scanner. In both these situations, because halftoning is completed before the target printing device and other printing conditions are known, the halftoning is performed either without tonal calibration or using an incorrect calibration curve. This results in artifacts in the printed image.
One prior attempt for applying tonal correction to a binary halftone image involves a three-step process: (1) descreening the original halftone image to create a contone image; (2) adjusting the tone of the contone image; and (3) screening the contone image to produce a new binary halftone image with the adjusted tone.
The descreening step applies a low pass filter to the binary original halftone image to produce the contone image. The low pass filter removes the original halftone structure from the original halftone image. A disadvantage of this step is that a filter strong enough to remove the halftone structure also removes some image detail. The adjusting step replaces each pixel in the contone image with a pixel having a corrected tone. The pixels having the corrected tone may be derived from an arbitrary function of the tone of the original pixel or may be derived from a more complex function of the tone taken from multiple color separations. The final screening step creates the new binary halftone image from the contone image. This step takes as input the contone image, screen frequency, screen angle, and dot shape. The screen frequency and angle may be extracted from the original binary halftone image with good success using Fourier techniques. A disadvantage of the step is that the dot shape can not usually be determined very reliably and choosing the wrong dot shape may cause image artifacts, such as tone jumps.
Another prior attempt for applying tonal correction to a binary halftone image involves using a low-pass filter that retains the halftone structure. Thus, the low-pass filter only softens the edges of the features in the image. Then, after descreening with the low-pass filter, a threshold is applied to the contone image to approximately reconstruct the original binary halftone image. If a point in the image is whiter than the threshold, the point is set to pure white. If a point in the image is blacker than the threshold, the point is set to pure black. In order to reconstruct the binary halftone image accurately in the highlights and shadows, the threshold must change as a function of the tonal value at each point. Adjusting the threshold away from the nominal position can be used to perform tonal correction on the image. This approach has two disadvantages. First, the filtering step removes a small amount of spot shape detail from the original image. Second, because the tonal change does not account for dot shape and edge roughness, errors are introduced during the tonal correction.
Accordingly, there is a need in the art for a method of applying tonal correction to a digital halftone image without producing any tonal artifacts.
In accordance with this invention, a system, method and a computer-readable medium for applying tonal correction to a binary halftone image are provided. The binary halftone image is formatted in a bit-mapped manner and is either uncalibrated or calibrated with a known calibration curve. A plurality of edge pixels are determined from the binary halftone image such that each edge pixel has a state that is different than the state of at least one neighboring pixel. A subset of the edge pixels are selected that will have their state modified to effectuate a desired tonal adjustment of the binary halftone image. A tonal change is determined for each edge pixel by descreening the image to determine a tonal value at each point in the image and applying a calibration curve to each tonal value. Descreening the image applies a two-dimensional low pass filter that removes the halftone structure from the binary halftone image.
In accordance with further aspects of this invention, in one embodiment, selecting the subset of the edge pixels that will have their state modified involves assigning a probability of change to each edge pixel. The probability of change assigned to each edge pixel is a ratio of 1) a number of pixels which have to change states in the neighborhood of the edge pixel to effectuate the desired tonal adjustment over 2) the number of edge pixels in the same neighborhood.
In another embodiment, error diffusion is used in combination with the probability of change to select the subset of edge pixels that are modified to effectuate the desired tonal adjustment. For each pixel in the image, if the pixel is an edge pixel and the probability of change is greater than 0.5 the state of the pixel is changed. Otherwise, the state of the pixel is unchanged. Error diffusion is used to propagate the residual error to neighboring pixels, thus, modifying the probability of change for the neighboring pixels.
In an alternate embodiment, the image is divided into small blocks. The state of the edge pixels in each block are changed pseudo-randomly based on the assigned probability of change. In order to minimize noise, multiple trial solutions are created for each block and the trial that minimizes the tonal error is chosen as a best trial. Error diffusion may be employed on each block to improve the uniformity of the distribution of the modified edge pixels throughout the image.
In another embodiment, selecting the subset of edge pixels that will have their state modified involves assigning a probability of change not just to the edge pixels but to every pixel in the image. The probability of change for each pixel is then the desired tonal change determined for the respective pixel. Although every pixel has a probability of change, only the edge pixels are allowed to change states. Error diffusion is applied to ensure that the probability of change for non-edge pixels is propagated to the edge pixels.
As will be readily appreciated from the foregoing summary, the invention provides a new and improved system, method and computer-readable medium for adjusting tone in binary halftone images to create smooth images without noise and other artifacts.